#include<stdio.h>
#include<math.h>
float fun(float x )
{
return 1/(1+x*x);
}
int main()
{
int i;
float a,b,n,h,I,s;
printf("the value of a,b,n");
scanf("%f%f%f%",&a,&b,&n);
h=(b-a)/n;
printf("the value of h iz %f",h);
s=fun(a)+fun(b);
for(i=1;i<=n-1;i++)
{
if(i%6==0)
s+=2*fun(a+(i*h));
else if(i%3==0&& i%6!=0)
s+=6*fun(a+(i*h));
else
if(i%2==0&&i%6!=0)
s+=fun(a+(i*h));
else if(i%2!=0&&i%3!=0)
s+=5*fun(a+(i*h));
else
s=0;
}
I=(3*h*s)/10;
printf("\n");
printf("the ans %f",I);
return 0;
}

